#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
# @Author  : tester
# @Site    : DONGFANG_HOTEL-10F
# @Software: PyCharm
# @datetime:2020/9/28 19:27
# @license: (C) Copyright 2018-2027, By 金锡科技.
"""
import time


class ScreenShot(object):
    def __init__(self, driver):
        self.driver = driver

    def screen_shot(self, pic_name):
        current_time = time.strftime("%Y-%m-%d-%H_%M_%S", time.localtime(time.time()))
        pic_path = 'E:\\workspace\\screenshot\\' + pic_name + '-' + current_time + '.png'
        self.driver.save_screenshot(pic_path)
